package com.aramis.mydytt

import com.aramis.mydytt.ext.getFriendlyTimeStr
import com.aramis.mydytt.ext.md5
import org.junit.Test

import org.junit.Assert.*

/**
 * Example local unit test, which will execute on the development machine (host).
 *
 * See [testing documentation](http://d.android.com/tools/testing).
 */
class ExampleUnitTest {
    @Test
    fun addition_isCorrect() {
        assertEquals(4, 2 + 2)
    }

    @Test
    fun testMD5() {
        val a = ("wq0LQbLUTH66x-header-request-timestamp=" + 1620724218 + "x-header-request-imei=").md5()
        val b ="sdlkfjsdkl".md5()
        println(a)
        println(b)
    }

    @Test
    fun testFriendly() {
        println(getFriendlyTimeStr("2021-05-24 20:20:20"))
        println(getFriendlyTimeStr("2021-05-23 20:20:20"))
        println(getFriendlyTimeStr("2020-05-23 20:20:20"))
        println(getFriendlyTimeStr("2010-05-23 20:20:20"))
        println(getFriendlyTimeStr("2021-05-24 20:25:20"))
    }
}